Getting this error - I know I'm missing something ...
# lucee
a
this.dataSource
in Application.cfc is not the same variable as
this.dataSource
in another CFC. This should not be a surprise
However if you have set a default datasource in Application.cfc (which is what
this.datasource
is, then you don't need to specify a data source in yer app (ie: it's the default). If that's the one yer wanting to use.
m
Tried application,dataspurce but says there is no datasource by that name but there is!
<cfset application.datasource= "boi-interview-local">
a
application.datasource
was incorrect advice.
m
😂
n
Yeah got confused, ignore me
a
Unless you actively create a variable called that in
onApplicationStart
, but should not need it if you have
this.datasource
set, and that's the only data source you need to use.
m
so what do I do sorry ?
dont understand apologies
never had this issue before
a
Reading the docs for the thing you are trying to use would always be a good first step 😉 https://docs.lucee.org/guides/cookbooks/datasource-define-datasource.html But like I said, if you have set a
this.datasource
in Application.cfc, then you don't need to specify it in the
<cfquery>
tag at all.
It's the whole idea of "default datasource"
<cfquery name="insertCompanyBOIinfo">
m
ah ok cheers @Adam Cameron 🙏
GENIUS! that 🙏 did it
😜 1
Doh!! feel like a right tw*t 😂